;(function($){
	var mainInfo = function(){
		var personalCenter;//个人中心
		var nearlyThreeMonth;//近三个月订单
		var notAppraise;//待评价订单
		var refund;
		var hongbao;
		var balance;
		var points;
		var info;
		var address;
		var security;
		var changepassword;
		var favor;//我的收藏
		
		
		var mainshow;//一级页面
		var nextshow;//次级页面
		
		var showArray = [];
		
		var initData = function(){
			
		};
		
		var loadEvent = function(){
			showArray = [personalCenter,nearlyThreeMonth,notAppraise,refund,hongbao,balance,points,info,address,security,changepassword,favor];
			for(var i = 0; i < showArray.length; i++){
				displyInfo(showArray[i],i);
			}
		}
		
		//给每个选项加一个点击事件，点击隐藏所有，展示自己
		var displyInfo = function(_node,i){
			_node.on('click',function(){
				mainshow.hide();
				nextshow.hide();
				$(mainshow[i]).show();
			});
		}

		return {
			run: function(){
				personalCenter = $(".personalct,icon-profile");
				nearlyThreeMonth = $('.profile-sidebar-section-myorder a:eq(0)');
				notAppraise = $('.profile-sidebar-section-myorder a:eq(1)');
				refund = $('.profile-sidebar-section-myorder a:eq(2)');
				hongbao = $('.profile-sidebar-section-myproperty a:eq(0)');
				balance = $('.profile-sidebar-section-myproperty a:eq(1)');
				points = $('.profile-sidebar-section-myproperty a:eq(2)');
				info = $('.profile-sidebar-section-mydata a:eq(0)');
				address = $('.profile-sidebar-section-mydata a:eq(1)');
				security = $('.profile-sidebar-section-mydata a:eq(2)');
				changepassword = $('.profile-sidebar-section-mydata a:eq(3)');
				favor = $('.profile-sidebar-section-mycollect a');
				mainshow = $('.mainshow');
				nextshow = $('.nextshow');
				initData();
				loadEvent();
			}
		}
	}();
	
	mainInfo.run();
	myOrder.run();
	myInfo.run();
	myProperty.run();
	myFavor.run();
	
})(jQuery);
